<include file="./Application/Admin/View/Public/htmlheader.html"/>
<include file="./Application/Admin/View/Public/header.html"/>
<include file="./Application/Admin/View/Public/left.html"/>

<ol class="breadcrumb">
    <li><a href="/Admin">首页</a></li>
    <li class="active">直播地址列表</li>
</ol>
<div class="row">
    <div class="col-lg-12">
        <div class="table-responsive">
            <table class="table table-hover table-bordered">
                <tr class="success">
                    <th>直播主地址</th>
                    <th>直播通道名称</th>
                    <th>播放地址</th>
                    <th>状态</th>
                    <th>是否绑定直播间</th>
                    <th>直播间号</th>
                    <th>操作</th>
                </tr>
                <volist name="liveUrl" id="vo" empty="暂时没有数据">
                    <tr>
                        <td>{$vo.address}</td>
                        <td>{$vo.channel}</td>
                        <td>{$vo.play}</td>
                        <td>
                            <if condition="$vo['status'] eq 1"><i class="icon-circle green icon-large"></i></if>
                            <if condition="$vo['status'] eq 0"><i class="icon-circle red icon-large"></i></if>
                        </td>
                        <td>
                            <if condition="$vo['roomId'] eq 0">
                                <span class="red">未绑定</span> <a href="/Admin/Room/roomBind" class="btn btn-success btn-xs">GO</a>
                                <else/>
                                <span class="green">已绑定</span>
                            </if>
                        </td>
                        <td>{$vo.roomNumber}</td>
                        <td>
                            <if condition="$permission['edit'] eq TRUE">
                            <a href="/Admin/LiveUrl/edit?liveUrlId={$vo['id']}" class="btn btn-info btn-xs">编辑</a>
                            </if>
                            <if condition="$permission['del'] eq TRUE">
                            <if condition="$vo['roomId'] eq 0">
                                <a href="/Admin/LiveUrl/delete?liveUrlId={$vo['id']}"
                                   onclick="return confirm('确定删除?');" class="btn btn-danger btn-xs">删除</a>
                            </if>
                            </if>
                        </td>
                    </tr>
                </volist>
            </table>
            <div class="row">
                <div class="col-lg-3">
                    <if condition="$permission['add'] eq TRUE">
                    <button class="btn btn-primary" data-toggle="modal" data-target="#addRoom">添加直播地址</button>
                    </if>
                </div>
                <div class="col-lg-9 text-center">
                    <nav>{$page}</nav>
                </div>
            </div>

        </div>
    </div>
</div>
<!--   添加用户 弹出层   -->
<div class="modal fade" id="addRoom" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span
                        class="sr-only">Close</span></button>
                <h4 class="modal-title" id="myModalLabel">添加直播间</h4>
            </div>
            <form action="/Admin/LiveUrl/add" method="post">
                <div class="modal-body">
                    <div class="row">
                        <div class="col-lg-3 text-right"><p><span class="red">*</span>直播主地址：</p></div>
                        <div class="col-lg-9"><input type="text" name="address" class="form-control" value="rtmp://www.live.com/onlinehls/" /></div>
                    </div>
                    <br/>
                    <div class="row">
                        <div class="col-lg-3 text-right"><p><span class="red">*</span>直播通道名称：</p></div>
                        <div class="col-lg-9"><input type="text" name="channel" class="form-control" value="{$channel}"/></div>
                    </div>
                    <br/>
                    <div class="row">
                        <div class="col-lg-3 text-right"><p><span class="red">*</span>播放地址：</p></div>
                        <div class="col-lg-9"><input type="text" name="play" class="form-control" value="http://192.168.0.65:8080/onlinehls/{$channel}"/></div>
                    </div>
                    <br/>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="submit" class="btn btn-primary">添加</button>
                </div>
            </form>
        </div>
    </div>
</div>
<include file="./Application/Admin/View/Public/footer.html"/>